package com.liry.dowloadtgz;

import java.io.IOException;

public class Test {
    public static void main(String[] args) throws IOException {
//        String t = "https://registry.npmmirror.com/@appworks/constant/-/constant-0.1.4.tgz";
////        HttpURLConnection httpURLConnection = DownloadTgz.getHttpURLConnection(t);
//        DownloadTgz.writeFile("D:\\npm-repository", "constant-0.1.4.tgz", t);
//

//        Map<String, String> stringStringMap = DownloadTgz.readYarnLockMap("D:\\npm-repository\\pageplug\\pageplug-open-v1.8\\app\\client/yarn.lock");
//        System.out.println(stringStringMap);

//        Map<String, String> stringStringMap = DownloadTgz.readPackageLockMap("D:\\npm-repository\\pageplug\\pageplug-open-v1.8\\app\\client\\package-lock.json");
//        System.out.println(stringStringMap);

//        String resolved = "https://registry.npmmirror.com/postcss-normalize-positions/-/postcss-normalize-positions-5.1.1.tgz#ef97279d894087b59325b45c47f1e863daefbb92";
//        resolved = resolved.substring(0, resolved.indexOf("#"));
//        System.out.println(resolved);
        String depName = "\"design-system@npm:@appsmithorg/design-system@1.0.38\":";
        String yarnlockDepName = DownloadTgz.getYarnlockDepName(depName);
        System.out.println(yarnlockDepName);
    }
}
